# Contributor: psykose <alice@ayaya.dev>
# Maintainer: psykose <alice@ayaya.dev>
pkgname=libebur128
pkgver=1.2.6
pkgrel=1
pkgdesc="Library implementing the EBU R128 loudness standard"
url="https://github.com/jiixyj/libebur128"
arch="all"
license="MIT"
options="!check" # needs extra unpackaged wav files
makedepends="cmake samurai"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/jiixyj/libebur128/archive/refs/tags/v$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DENABLE_TESTS="$(want_check && echo ON || echo OFF)"
	cmake --build build

}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
ab188c6d32cd14613119258313a8a3fb1167b55501c9f5b6d3ba738d674bc58f24ac3034c23d9730ed8dc3e95a23619bfb81719e4c79807a9a16c1a5b3423582  libebur128-1.2.6.tar.gz
"
